﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Neat;
using Neat.MenuSystem;
using Neat.EasyMenus;
using Neat.GUI;
using Neat.Mathematics;
using Neat.Graphics;

namespace RattlerRace
{
    public class OptionsScreen : Screen
    {
        Label labelSteviloKac;
        Label fieldSteviloKac;
        Label labelSteviloZog;
        Label fieldSteviloZog;
        Label labelTezavnost;
        Label fieldTezavnost;
        Label labelHitrostIgre;
        Label fieldHitrostIgre;
        Label labelZacetniLevel;
        Label fieldZacetniLevel;

        string font = "menuFontZ";

        public OptionsScreen(NeatGame Game)
            : base(Game)
        {
            
        }

        public override void Initialize()
        {
            base.Initialize();
            drawMenu();
            base.Form.HasMouse = true;
            base.game.ShowMouse = true;

            Button backtoMainMenu = Form.NewControl("backtoMainMenu", new Button()) as Button;
            backtoMainMenu.Caption = "Main menu";
            backtoMainMenu.Position = new Vector2(100, 350);
            backtoMainMenu.ForeColor = Color.White;
            backtoMainMenu.HoverTintColor = Color.Green;
            backtoMainMenu.Size = new Vector2(400, 70);
            backtoMainMenu.OnPress = backtoMainMenu_OnPress;
        }

        public void drawMenu() {

            labelSteviloKac = Form.NewControl("labelSteviloKac", new Label()) as Label;
            labelSteviloKac.Font = font;
            labelSteviloKac.Caption = "Stevilo kac";
            labelSteviloKac.Position = new Vector2(100, 100);
            labelSteviloKac.ForeColor = Color.White;

            fieldSteviloKac = Form.NewControl("fieldSteviloKac", new Label()) as Label;
            fieldSteviloKac.Font = font;
            fieldSteviloKac.Caption = "" + Game1.GameOptions.StKac;
            fieldSteviloKac.Position = new Vector2(240, 100);
            fieldSteviloKac.ForeColor = Color.White;

            labelSteviloZog = Form.NewControl("labelSteviloZog", new Label()) as Label;
            labelSteviloZog.Font = font;
            labelSteviloZog.Caption = "Stevilo zog";
            labelSteviloZog.Position = new Vector2(100, 140);
            labelSteviloZog.ForeColor = Color.White;

            fieldSteviloZog = Form.NewControl("fieldSteviloZog", new Label()) as Label;
            fieldSteviloZog.Font = font;
            fieldSteviloZog.Caption = "" + Game1.GameOptions.StZog;
            fieldSteviloZog.Position = new Vector2(240, 140);
            fieldSteviloZog.ForeColor = Color.White;

            labelTezavnost = Form.NewControl("labelTezavnost", new Label()) as Label;
            labelTezavnost.Font = font;
            labelTezavnost.Caption = "Tezavnost";
            labelTezavnost.Position = new Vector2(100, 180);
            labelTezavnost.ForeColor = Color.White;

            fieldTezavnost = Form.NewControl("fieldTezavnost", new Label()) as Label;
            fieldTezavnost.Font = font;
            fieldTezavnost.Caption = "" + Game1.GameOptions.Tezavnost;
            fieldTezavnost.Position = new Vector2(240, 180);
            fieldTezavnost.ForeColor = Color.White;

            labelHitrostIgre = Form.NewControl("labelHitrostIgre", new Label()) as Label;
            labelHitrostIgre.Font = font;
            labelHitrostIgre.Caption = "Hitrost igre";
            labelHitrostIgre.Position = new Vector2(100, 220);
            labelHitrostIgre.ForeColor = Color.White;

            fieldHitrostIgre = Form.NewControl("fieldHitrostIgre", new Label()) as Label;
            fieldHitrostIgre.Font = font;
            fieldHitrostIgre.Caption = "" + Game1.GameOptions.HitrostIgre;
            fieldHitrostIgre.Position = new Vector2(240, 220);
            fieldHitrostIgre.ForeColor = Color.White;

            labelZacetniLevel = Form.NewControl("labelZacetniLevel", new Label()) as Label;
            labelZacetniLevel.Font = font;
            labelZacetniLevel.Caption = "Zacetni level";
            labelZacetniLevel.Position = new Vector2(100, 260);
            labelZacetniLevel.ForeColor = Color.White;

            fieldZacetniLevel = Form.NewControl("fieldZacetniLevel", new Label()) as Label;
            fieldZacetniLevel.Font = font;
            fieldZacetniLevel.Caption = "" + Game1.GameOptions.ZacetniLevel;
            fieldZacetniLevel.Position = new Vector2(240, 260);
            fieldZacetniLevel.ForeColor = Color.White;



            Button stKacButtonU = Form.NewControl("stKacButtonU", new Button()) as Button;
            stKacButtonU.Caption = "+";
            stKacButtonU.Position = new Vector2(270, 100);
            stKacButtonU.ForeColor = Color.White;
            stKacButtonU.HoverTintColor = Color.Green;
            stKacButtonU.Size = new Vector2(20, 15);
            stKacButtonU.OnPress = mybutton_OnPress;

            Button stKacButtonD = Form.NewControl("stKacButtonD", new Button()) as Button;
            stKacButtonD.Caption = "-";
            stKacButtonD.Position = new Vector2(270, 115);
            stKacButtonD.ForeColor = Color.White;
            stKacButtonD.HoverTintColor = Color.Green;
            stKacButtonD.Size = new Vector2(20, 15);
            stKacButtonD.OnPress = mybutton_OnPress;

            Button stZogButtonU = Form.NewControl("stZogButtonU", new Button()) as Button;
            stZogButtonU.Caption = "+";
            stZogButtonU.Position = new Vector2(270, 140);
            stZogButtonU.ForeColor = Color.White;
            stZogButtonU.HoverTintColor = Color.Green;
            stZogButtonU.Size = new Vector2(20, 15);
            stZogButtonU.OnPress = mybutton_OnPress;

            Button stZogButtonD = Form.NewControl("stZogButtonD", new Button()) as Button;
            stZogButtonD.Caption = "-";
            stZogButtonD.Position = new Vector2(270, 155);
            stZogButtonD.ForeColor = Color.White;
            stZogButtonD.HoverTintColor = Color.Green;
            stZogButtonD.Size = new Vector2(20, 15);
            stZogButtonD.OnPress = mybutton_OnPress;

            Button TezavnostButtonU = Form.NewControl("TezavnostButtonU", new Button()) as Button;
            TezavnostButtonU.Caption = "+";
            TezavnostButtonU.Position = new Vector2(270, 180);
            TezavnostButtonU.ForeColor = Color.White;
            TezavnostButtonU.HoverTintColor = Color.Green;
            TezavnostButtonU.Size = new Vector2(20, 15);
            TezavnostButtonU.OnPress = mybutton_OnPress;

            Button TezavnostButtonD = Form.NewControl("TezavnostButtonD", new Button()) as Button;
            TezavnostButtonD.Caption = "-";
            TezavnostButtonD.Position = new Vector2(270, 195);
            TezavnostButtonD.ForeColor = Color.White;
            TezavnostButtonD.HoverTintColor = Color.Green;
            TezavnostButtonD.Size = new Vector2(20, 15);
            TezavnostButtonD.OnPress = mybutton_OnPress;

            Button HitrostIgreButtonU = Form.NewControl("HitrostIgreButtonU", new Button()) as Button;
            HitrostIgreButtonU.Caption = "+";
            HitrostIgreButtonU.Position = new Vector2(270, 220);
            HitrostIgreButtonU.ForeColor = Color.White;
            HitrostIgreButtonU.HoverTintColor = Color.Green;
            HitrostIgreButtonU.Size = new Vector2(20, 15);
            HitrostIgreButtonU.OnPress = mybutton_OnPress;

            Button HitrostIgreButtonD = Form.NewControl("HitrostIgreButtonD", new Button()) as Button;
            HitrostIgreButtonD.Caption = "-";
            HitrostIgreButtonD.Position = new Vector2(270, 235);
            HitrostIgreButtonD.ForeColor = Color.White;
            HitrostIgreButtonD.HoverTintColor = Color.Green;
            HitrostIgreButtonD.Size = new Vector2(20, 15);
            HitrostIgreButtonD.OnPress = mybutton_OnPress;

            Button ZacetniLevelButtonU = Form.NewControl("ZacetniLevelButtonU", new Button()) as Button;
            ZacetniLevelButtonU.Caption = "+";
            ZacetniLevelButtonU.Position = new Vector2(270, 260);
            ZacetniLevelButtonU.ForeColor = Color.White;
            ZacetniLevelButtonU.HoverTintColor = Color.Green;
            ZacetniLevelButtonU.Size = new Vector2(20, 15);
            ZacetniLevelButtonU.OnPress = mybutton_OnPress;

            Button ZacetniLevelButtonD = Form.NewControl("ZacetniLevelButtonD", new Button()) as Button;
            ZacetniLevelButtonD.Caption = "-";
            ZacetniLevelButtonD.Position = new Vector2(270, 275);
            ZacetniLevelButtonD.ForeColor = Color.White;
            ZacetniLevelButtonD.HoverTintColor = Color.Green;
            ZacetniLevelButtonD.Size = new Vector2(20, 15);
            ZacetniLevelButtonD.OnPress = mybutton_OnPress;
        }

        void mybutton_OnPress()
        {
            
        }

        void backtoMainMenu_OnPress()
        {
            base.game.Console.Run("e_show mainmenu");
        }
    }
}
